﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TangCaptureTraffic
{
    internal class Config
    {
        public MemoryConfigData MemoryConfig { get; set; }
    }

    public class MemoryConfigData
    {
        /// <summary>
        /// 是否启用自动内存清理
        /// </summary>
        public  bool EnableAutoMemoryCleanup { get; set; } = true;

        /// <summary>
        /// 内存清理间隔时间（毫秒）
        /// </summary>
        public  int MemoryCleanupInterval { get; set; } = 30000; // 30秒

        /// <summary>
        /// 最大会话数量限制
        /// </summary>
        public  int MaxSessions { get; set; } = 1000;

        /// <summary>
        /// 会话清理数量
        /// </summary>
        public  int SessionCleanupCount { get; set; } = 200;

        /// <summary>
        /// UI最大会话数量限制
        /// </summary>
        public  int MaxUISessions { get; set; } = 500;

        /// <summary>
        /// UI会话清理数量
        /// </summary>
        public  int UISessionCleanupCount { get; set; } = 100;


        /// <summary>
        /// 内存使用警告阈值（MB）
        /// </summary>
        public  int MemoryWarningThreshold { get; set; } = 500;
    }
}
